package com.atguigu.ssyx.user.api;

import com.atguigu.ssyx.user.service.UserService;
import com.atguigu.ssyx.vo.user.LeaderAddressVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * ClassName: LeaderAddressApiController
 * Package: com.atguigu.ssyx.user.api
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-10-02
 * Time: 23:30
 */

//远程调用的接口

@RestController
@RequestMapping("/api/user/leader")
public class LeaderAddressApiController {

    @Autowired
    private UserService userService;

    //根据用户Id查询提货点和团长信息
    @GetMapping("/inner/getUserAddressByUserId/{userId}")
    public LeaderAddressVo getUserAddressByUserId(@PathVariable("userId") Long userId){
        LeaderAddressVo leaderAddressVo = userService.getLeaderAddressByUserId(userId);
        return leaderAddressVo;
        //接口写完之后 还要定义
    }

}
